package net.xinqushi.design.Factory.model;

/**
 * singleton 单例模式
 */
public class Car implements Traffic{

    private static Car car;

    private Car(){}; //私有化

    public static synchronized Car getInstance(){
        if( null == car)
            return car = new Car();
        else
            return car;
    }
}
